﻿using System;
using Prism.Regions;

namespace ProductionLine.Core.Mvvm {
    public class RegionViewModelBase : ViewModelBase, INavigationAware, IConfirmNavigationRequest {
        protected IRegionManager RegionManager { get; private set; }

        public RegionViewModelBase(IRegionManager regionManager) {
            RegionManager = regionManager;
        }

        public virtual void ConfirmNavigationRequest(NavigationContext navigationContext, Action<bool> continuationCallback) {
            continuationCallback(true);
        }

        public virtual bool IsNavigationTarget(NavigationContext navigationContext) {
            return true;
        }

        public virtual void OnNavigatedFrom(NavigationContext navigationContext) {

        }

        public virtual void OnNavigatedTo(NavigationContext navigationContext) {

        }
    }
}
